package com.cj.factory;

import okhttp3.OkHttpClient;

/**
 * 静态工厂，，， ： 获取bean直接通过  类名.方法名 调用
 * @author cc
 * @date 2025-05-12 16:16
 **/

public class OkHttpClientStaticFactory {

    private static OkHttpClient client;

    static {
        OkHttpClient.Builder builder = new OkHttpClient.Builder();

        builder.setConnectTimeout$okhttp(5000);
        builder.setReadTimeout$okhttp(5000);

       client = builder.build();
    }

    public static OkHttpClient getInstance(){
        return client;
    }
}
